home *** CD-ROM | disk | FTP | other *** search
/ 3D Images / 3D Images.iso / programs / amiga / batchfactory / scripts / par / par_anim_from_images next >
Encoding:
Text File  |  1995-01-12  |  2.8 KB  |  102 lines

  1. /* 
  2.                         PAR CREATE ANIM FROM IMAGES
  3.                                By J.L. White
  4.                           ©1994 Merlin's Software
  5.  
  6.                Takes Multiple Images & Builds PAR Anim File
  7.                     Personal Animation Recorder Script
  8.                       Requires The Rexxarplib.library
  9.               Use As The Last Script In Multiple Script Mode
  10.  
  11.  Batch Factory Batch Conversion Scripts are basically Arexx scripts that
  12. allow you to pass certain parameters to the external program you wish
  13. to use to convert the images from one format to another. You can pass
  14. five different strings from Batch Factory to the script by using the
  15. following commands:
  16.  
  17. $N = This will pass the current selected filename.
  18. $P = This will tell Batch Factory to ask for a path to save new frames to.
  19. $# = This will pass the current frame number in the script.
  20. $T = This will pass the total number of frames in the script.
  21. $A = This will pass an offset number to be used to save frames with.
  22.  
  23. NOTE: The following line is required to work as a Batch Factory Script:
  24.  
  25. PARSE=$N $# $T
  26.  
  27. */
  28.  
  29. arg InFile FileNum TotalNum
  30. options results
  31. if ~show('l', "rexxarplib.library") then do
  32.     check = addlib('rexxsupport.library',0,-30,0) 
  33.     check = addlib('rexxarplib.library',0,-30,0)   
  34.     end
  35. PName = "Batch"
  36.  
  37.  
  38. Top = 170
  39. Height = ScreenRows(PName)
  40. if Height < 400 then Top = 70
  41. call Locate_PAR
  42. address "DDR"
  43.  
  44.  
  45. if FileNum = 1 then do
  46.     address "AREXX" ScreenToFront(PName)
  47.     call Request(200,Top,"  Enter Q-Factor (1-23)","8","OKAY","CANCEL",PName)
  48.     if result < 1 then result = 1
  49.     QFactor result
  50.     call Request(200,Top,"Enter Block Limit (1-220)","156","OKAY","CANCEL",PName)
  51.     if result < 1 then result = 156
  52.     Limit result
  53.     Filter On
  54.     Mode Anim
  55.     call Request(200,Top,"Enter Name For Project!","","OKAY","CANCEL",PName)
  56.     if result = "" then do
  57.         call Request(200,Top-14,"Process Has Been Cancelled\Please Abort Script!!",,"OK",,PName)
  58.         address command "Wait 3"
  59.         exit
  60.         end
  61.     Path = result
  62.     call Request(200,Top,"Enter Name For Animation!","","OKAY","CANCEL",PName)
  63.     if result = "" then do
  64.         call Request(200,Top-14,"Process Has Been Cancelled\Please Abort Script!!",,"OK",,PName)
  65.         address command "Wait 3"
  66.         exit
  67.         end
  68.     Name = left(result,17)
  69.     Name = strip(Name)
  70.     call open OutData,"RAM:PAFI.Temp",'W'
  71.     call writeln OutData,Path
  72.     call writeln OutData,Name
  73.     call close OutData
  74.     address command "Makedir DDR:"Path
  75.     end
  76. else do
  77.     call open InData,"RAM:PAFI.Temp",'R'
  78.     Path = readln(InData)
  79.     Name = readln(InData)
  80.     call close InData
  81.     Path = strip(Path)
  82.     Name = strip(Name)
  83.     end
  84.  
  85. address command "Copy "InFile" To DDR:"Path"/"Name
  86. if FileNum = TotalNum then do
  87.     DONE
  88.     address command "C:Delete >NIL: RAM:PAFI.Temp"
  89.     end
  90. exit
  91.  
  92. Locate_PAR:
  93.     if (POS('DDR',SHOW('Ports')) = 0)
  94.     then do
  95.         call Request(180,Top-14,"Can Not Locate The PAR Software\Please Abort Script & Try Again!",,"OK",,PName)
  96.         address command "Wait 3"
  97.     end
  98. return
  99.  
  100.  
  101.  
  102.